#ifndef SORT__ARRAY__COMPARE__GENERATOR
#define SORT__ARRAY__COMPARE__GENERATOR
#include "ArrayCompareGenerator.h"
#include <algorithm>
typedef vector<int>(*TestFun)(vector<int>&);
class SortArrayCompareGenerator : public ArrayCompareGenerator{
public:
    vector<int> RightMathod(vector<int>);
    bool compare(TestFun,int);

};


bool SortArrayCompareGenerator::compare(TestFun fun,int count)
{
    for(int i = 0 ; i < count ; i++) {
        if(GetCompareTemp(10,100)) {
            vector<int> arrayOne = GetArray();
#ifdef G_DEBUG
    for(auto i:arrayOne){
        cout<<i<<" ";
    }
    cout<<endl;
#endif
            vector<int> arrayTwo = GetArray();
#ifdef G_DEBUG
    for(auto i:arrayTwo){
        cout<<i<<" ";
    }
    cout<<endl;
#endif
            sort(arrayOne.begin(),arrayOne.end());
#ifdef G_DEBUG
    for(auto i:arrayOne){
        cout<<i<<" ";
    }
    cout<<endl;
#endif
            arrayTwo=(*fun)(arrayTwo);
#ifdef G_DEBUG
    for(auto i:arrayTwo){
        cout<<i<<" ";
    }
    cout<<endl;
#endif
            if(!IsEqual(arrayOne,arrayTwo)) {
                return false;
            }

        }
    }
    
    return true;
}

#endif 